<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta name="format-detection" content="telephone=no"/>
    <!--<link rel="stylesheet" type="text/css" href="<?php /*echo $_BASE_DIR*/?>special/main.css"/>-->
    <title>接口控制</title>
    <script type="text/javascript">
        var Sys = {};
        var ua = navigator.userAgent.toLowerCase();
        var s;
        (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
            (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
                (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
                    (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
                        (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
        var ieversion;
        if (window.ActiveXObject && Sys.ie){
            ieversion = parseInt(Sys.ie);
            if(ieversion<8) {
                //alert("尊敬的用户！\n\n您目前使用的Internet Explorer版本为"+Sys.ie+"，请升级到9.0以上或用火狐、谷歌、Safari等其他浏览器打开，可体验模块拖拽功能！");
                window.location.href="<?php echo url("tabbar/index",array('acct_id'=>$acct_id))?>";
            }
        }
    </script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>special/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>special/jquery-ui.min.js"></script>
    <link href="<?php echo $_BASE_DIR?>special/jquery-ui.css" rel="stylesheet" type="text/css">
    <link href="<?php echo $_BASE_DIR?>css_v1/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.idTabs.min.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/select-ui.min.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>javascripts/commond.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.DatePicker.js"></script>
    <link href="<?php echo $_BASE_DIR?>uploadify/css/uploadify.css" rel="stylesheet" type="text/css" />
    <script src="<?php echo $_BASE_DIR?>javascripts/jquery.ocupload.min.js" type="text/javascript"></script>

    <!-- jQuery Gridly -->
    <link href='<?php echo $_BASE_DIR?>css/jquery.gridly.css' rel='stylesheet' type='text/css'>
    <link href='<?php echo $_BASE_DIR?>css/sample.css' rel='stylesheet' type='text/css'>
    <script src='<?php echo $_BASE_DIR?>javascripts/jquery.gridly.js' type='text/javascript'></script>
    <script src='<?php echo $_BASE_DIR?>javascripts/tabbar.js' type='text/javascript'></script>
    <script>
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-31911059-1']);
        _gaq.push(['_trackPageview']);
        (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
    <!-- jQuery Gridly END-->
    <script>
        jQuery(document).ready($(function(){

            // 下拉框
            $(".select1").uedSelect({
                width : 345
            });
            $(".select2").uedSelect({
                width : 130
            });
            $(".select3").uedSelect({
                width : 110
            });
            //启动tip功能
            $( document ).tooltip({
                position: { my: "left+15 center", at: "right center" }
            });
            //支持拖动弹出框
             var move=false;//移动标记
             var _x,_y;//鼠标离控件左上角的相对位置
             $(".drag").mousedown(function(e){
             move=true;
             _x=e.pageX-parseInt($(".drag").css("left"));
             _y=e.pageY-parseInt($(".drag").css("top"));
             });
             $(document).mousemove(function(e){
             if(move){
             var x=e.pageX-_x;//控件左上角到屏幕左上角的相对位置
             var y=e.pageY-_y;
             $(".drag").css({"top":y,"left":x});
             }
             }).mouseup(function(){
             move=false;
             });
        }));


    </script>
</head>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="<?php echo url("leftmenu/bottom")?>">首页</a></li>
        <li><a href="javascript:;">接口控制</a></li>
    </ul>
</div>
<div class="formbody">
    <div id="usual1" class="usual">
        <ul class="forminfo">
            <div class = "drag pop_interface_module" data-mzacctid="<?php echo $_SESSION['acct']['id'];?>">
                <a href="javascript:;" style="float:right;padding:10px 20px;" title="关闭" class="close">&times;</a>
                <form action="<?php echo url('')?>" method="post">
                    <li>
                        <?php $transfer_error = 'url';?>
                        <label style="margin-left:6%;margin-top:8%">功能选择:</label>
                        <div class="vocation" style="margin-top:7%;">
                            <select name="moduleselect" class="select2 module_function" id="moduleselect" onchange="new_select_module(this.value)">
                                <option value="url" >跳转自定义页面</option>
                                <option value="home" >首页</option>
                                <option value="shoponline" >商城</option>
                                <option value="tiku" >题库</option>
                                <option value="usercenter" >用户个人中心</option>
                                <option value="fxcenter" >分销个人中心</option>
                                <option value="mycourse" >我的课程</option>
                                <option value="vip" >开通vip</option>
                            </select>
                        </div>
                        
                        <input type="hidden" value="<?php echo $acct_id;?>" name="acct_id" />
                    </li>
                    <li >
                        <label style="margin-left:6%;">跳转链接：</label>
                        <input type="url" class="dfinput module_jump" style="width:440px;" value="" name="url" />
                    </li>
                    <li>
                        <label style="margin-left:6%;">菜单名称：</label>
                        <input type="text" class="dfinput module_name" style="width:130px;"  style="width:100px;" value="" name="name" />
                    </li>
                    <li>
                        <label style="margin-left:6%">菜单图片(颜色值#999999)：</label>
                        <?php   echo Q::control('uploadbuttonhost', 'img', array('class'=>'required','maxkb'=>'50kb'));?>
                    </li>
                    <li>
                        <label style="margin-left:6%">高亮菜单图片(颜色值#47c390)：</label>
                        <?php   echo Q::control('uploadbuttonhost', 'act_img', array('class'=>'required','maxkb'=>'50kb'));?>
                    </li>
                    <li>
                        <input type="button" class="btn submit_interface_module" value="确定" style="float: right;margin-right: 65px"/>
                    </li>
                </form>
            </div>
        </ul>
    </div>
</div>
<!-- jQuery Gridly -->
<div class='content'>
    <section class='example'>
        <div class='gridly'>
            <?php if($lists): foreach($lists as $item):?>
                <div class='brick small' data-id="<?php echo $item['id'];?>" data-url="<?php echo $item['url'];?>" data-module="<?php echo $item['moduleselect'];?>">
                    <div class="ico"><img src="<?php echo $item['img'];?>"></div>
                    <div hidden="hidden" class="act_ico"><img src="<?php echo $item['act_img'];?>"></div>
                    <div class="name"><?php echo $item['name'];?></div>
                    <a class='delete' href='javascript:;'>&times;</a>
                    <a class='edit' href='javascript:;'><img src="/images_v1/t02.png"></a>
                </div>
            <?php endforeach;endif;?>
        </div>
        <p class='actions'>
            <a class='add button' href='javascript:;'>新增模块</a>
        </p>
    </section>
</div>
</body>
</html>